package com.jzh.cmhSystem.biz.impl;


import com.jzh.cmhSystem.biz.SectionService;
import com.jzh.cmhSystem.entity.Section;
import com.jzh.cmhSystem.mapper.SectionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SectionServiceImpl implements SectionService {

    @Autowired
    SectionMapper sectionMapper;

    @Override
    public int addSection(Section section) {
        sectionMapper.insert(section);
        return section.getSection_id();
    }

    @Override
    public Section getSectionById(Integer id) {
        return sectionMapper.selectById(id);
    }
}
